UpdateCommand
Updates the motion parameters of a command.
Syntax
KsCommandStatus UpdateCommand(
double Position,
double Velocity,
double EndVelocity,
double Acceleration,
double Deceleration,
double Jerk,
KsCommandStatus Status
);
Parameters
Position: the commanded position for the motion. [unit] (negative or positive)
Velocity: the value of the maximum velocity. [unit/second]
EndVelocity: the value of the end velocity. Signed value. [unit/second]
Acceleration: the value of the acceleration. Always positive. The unit is determined by the McProfileType type. (increasing power of the motor) [unit/second2] or [second]
Deceleration: the value of the deceleration. Always positive. The unit is determined by the McProfileType type. (decreasing power of the motor) [unit/second2] or [second]
Jerk: the value of the jerk. Always positive. The unit is determined by the McProfileType type. [unit/second3] or [second]
Status: the KsCommandStatus structure returned when the command was initiated.
Return value
Returns the KsCommandStatus structure.
Remarks
- When modulo axis is enabled, the modulo value will be applied to the target position of MoveAxisAbsolute and MoveAxisContinuousAbsolute. After the target position is updated, MoveAxisAbsolute and MoveAxisContinuousAbsolute will recalculate the distance based on the configured Direction.
- The following table shows the functions and their parameters that can be used with UpdateCommand.
Functions | Parameters |
---|---|
HaltAxis | Deceleration, Jerk |
InchAxis | Distance, Velocity, EndVelocity, Acceleration, Deceleration, Jerk |
JogAxis | Velocity, EndVelocity, Acceleration, Deceleration, Jerk |
MoveAxisAbsolute | Position, Velocity, Acceleration, Deceleration, Jerk |
MoveAxisAdditive | Distance, Velocity, Acceleration, Deceleration, Jerk |
MoveAxisContinuousAbsolute | Position, Velocity, EndVelocity, Acceleration, Deceleration, Jerk |
MoveAxisContinuousRelative | Distance, Velocity, EndVelocity, Acceleration, Deceleration, Jerk |
MoveAxisRelative | Distance, Velocity, Acceleration, Deceleration, Jerk |
MoveAxisVelocity | Velocity, EndVelocity, Acceleration, Deceleration, Jerk |
SetAxisGear | Acceleration, Deceleration, Jerk |
StopAxis | Deceleration, Jerk |
HaltGroup* | Deceleration, Jerk |
InchGroup* | Acceleration, Deceleration, Jerk |
JogGroup* | Acceleration, Deceleration, Jerk |
MoveLinearAbsolute* | Velocity, Acceleration, Deceleration, Jerk |
MoveLinearRelative* | Velocity, Acceleration, Deceleration, Jerk |
MoveLinearAdditive* | Velocity, Acceleration, Deceleration, Jerk |
MoveCircularAbsolute* | Velocity, Acceleration, Deceleration, Jerk |
MoveCircularRelative* | Velocity, Acceleration, Deceleration, Jerk |
MoveCircularAdditive* | Velocity, Acceleration, Deceleration, Jerk |
MoveHelicalAbsolute* | Velocity, Acceleration, Deceleration, Jerk |
MoveHelicalRelative* | Velocity, Acceleration, Deceleration, Jerk |
MoveHelicalAdditive* | Velocity, Acceleration, Deceleration, Jerk |
StopGroup* | Deceleration, Jerk |
* Starting from KINGSTAR 4.5, UpdateCommand supports group motion functions and their parameters listed on the table.
Example
N/A
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | ksmotion.h | ksmotion.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also